<?php
class mcz_RolePermission extends mcz_Object
{
	protected $fields = array(
		'id' => array('cast' => 'integer'),
		'role_id' => array('cast' => 'integer',
						   'notblank' => true),
		'permission_id' => array('cast' => 'integer',
								 'notblank' => true)
	);

	public static function clean($perm_id, $role_id)
	{
		self::dbh()->exec('delete from ' . get_class()
						  . ' where permission_id = ' . (int)$perm_id
						  . ' and role_id = ' . (int)$role_id);
	}
}